import regular from '@/configs/regular_config'

/**
 * 用户名正则
 * @param {string} val 
 * @returns boolean
 */
export function usernameRegx(val){
   return regular.usernameRegx.test(val)
}

/**
 * 密码正则
 * @param {string} val 
 * @returns boolean
 */
export function passwordRegx(val){
    return regular.passwordRegx.test(val)
}

/**
 * 手机号正则
 * @param {string} val 
 * @returns boolean
 */
export function phoneRegx(val){
    return regular.phoneRegx.test(val)
}

/**
 * 身份证号正则
 * @param {string} val 
 * @returns boolean
 */
export function idcardRegx(val){
    return regular.idcardRegx.test(val)
}

/**
 * 邮箱验证
 * @param {string} val 
 * @returns boolean
 */
export function emailRegx(val){
    return regular.emailRegx.test(val)
}

/**
 * 字符串正则
 * @param {string} val 
 * @returns 
 */
export function ipadressRegx(val){
    return regular.ipadressRegx.test(val)
}